package principal;

import java.io.*;

public class StatLOC {

    public static void main(String args[]) {

    	String svn = "\"C:\\Documents and Settings\\silviojr\\bin\\svn\"";
    	String diff = "\"C:\\Documents and Settings\\silviojr\\GnuWin32\\bin\\diff.exe\"";
    	String base = "\"C:\\Documents and Settings\\silviojr\\";
        String s = null;
        Contador contador = new Contador();
        int adicionadasU, subtraidasU; //linhas adicionadas e subtraidas segundo o formaato unificado
        int adicionadaC, modificadasC; //linhas adicionadas e modificadas segundo o formato contexto
        try {
            /*
        	// Executa diff entre duas datas 
        	String comando = "cmd /c " + svn + " diff --diff-cmd " + diff + " --extensions -c -r {2011-06-28}:{2011-06-30} " + base +"bin\\tp-es\" >> " + base + "saida_contexto\"";
        	comando = base + "scriptsvn.cmd\"";
        	System.out.println(comando);
            Process p = Runtime.getRuntime().exec(comando);
            try{
            	p.waitFor();
            }
            catch(Exception e){    	
                System.out.println("exception happened - here's what I know: ");
                e.printStackTrace();
                System.exit(-1);
            }
            
        	// Executa diff entre duas datas 
        	comando = "cmd /c " + svn + " diff --diff-cmd " + diff + " --extensions -c -r {2011-06-28}:{2011-06-30} " + base +"bin\\tp-es\" >> " + base + "saida_contexto\"";
        	comando = base + "script2.cmd\"";
        	System.out.println(comando);
            p = Runtime.getRuntime().exec(comando);
            try{
            	p.waitFor();
            }
            catch(Exception e){    	
                System.out.println("exception happened - here's what I know: ");
                e.printStackTrace();
                System.exit(-1);
            }
            */
            contador.contaLinhas();
        }
        catch (Exception e) {
            System.out.println("exception happened - here's what I know: ");
            e.printStackTrace();
            System.exit(-1);
        }
    }
}

